package com.jinzhi.jzapi.utils;

import lombok.Getter;

@Getter
public enum ExceptionEnum {
    /**
     * 文件类型错误时使用
     */
    TRY_CATH_ERROY(406, "tryCatch块错误"),
    INVALID_FILE_TYPE(400, "无效的文件类型！"),
    INVALID_PARAM_ERROR(400, "无效的请求参数！"),
    INVALID_PHONE_NUMBER(400, "无效的手机号码"),
    INVALID_PHONE_NULL(403, "无效的手机号码"),
    INVALID_VERIFY_CODE(400, "验证码错误！"),
    INVALID_USERNAME_PASSWORD(400, "无效的用户名和密码！"),
    INVALID_SERVER_ID_SECRET(400, "无效的服务id和密钥！"),
    INVALID_NOTIFY_PARAM(400, "回调参数有误！"),
    INVALID_NOTIFY_SIGN(400, "回调签名有误！"),
    WX_ERROR_CODE(1002, "微信状态错误！"),
    TOKENFIAL(409, "token不存在！"),
    NO_TOKEN(28004, "token验证失败！"),
    USER_NULL_FAIL(409, "token不存在！"),
    USER_FAIL(410, "登录失效或未登录！"),
    JWT_TOKEN_FAIL(40002, "token不存在！"),
    JWT_TOKEN_NULL(509, "非法请求！"),
    UNAUTHORIZED(401, "登录失效或未登录！");


    /**
     * 状态码
     */
    private int status;
    /**
     * 异常信息
     */
    private String message;

    ExceptionEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
}

